import 'package:demo/pages/animationPage.dart';
import 'package:demo/pages/labelTopPage.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
      designSize: Size(750, 1334),
      builder: () => MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
 
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    ));
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(

        title: Text(widget.title),
      ),
      body: Center(

        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
          GestureDetector(onTap: (){
            Navigator.of(context).push(new MaterialPageRoute(builder: (_) {
                    return new LabelTopPage();
                  }));
          },child: Container(alignment: Alignment.center, color: Colors.blue,width: 300,height: 40,child:Text('标签页吸顶',style: TextStyle(color: Colors.white),)),),
          SizedBox(height: 20,),
          GestureDetector(onTap: (){
            Navigator.of(context).push(new MaterialPageRoute(builder: (_) {
                    return new CustomSliverHeaderDemo();
                  }));
          },child: Container(alignment: Alignment.center, color: Colors.blue, width: 300,height: 40,child:Text('顶部动画',style: TextStyle(color: Colors.white),)),),
          ],
        ),
      ),
    );
  }
}
